{% extends 'style/base/base.html' %}{% load staticfiles %}
{% block content-header %}
  <section class="content-header">
    <h1>
      基础信息设置
      <small>操作面板</small>
    </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
      <li class="active">基础信息设置</li>
    </ol>
  </section>
{% endblock content-header %}
{% block content %}
  <hr>
  <section class="content">
    <div class="col-sm-12">
      <div class="box box-primary">
        <div class="box-header with-border">
          <h4>
            系统参数信息设置 <small> 请在各选项卡中填写所需要的顾客信息</small>
          </h4>
        </div>
          <div class="box-body">
            <!-- Custom Tabs -->
            <div class="nav-tabs-custom">
              <ul class="nav nav-tabs">
                <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true">基本资料</a></li>
                <li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">扩展资料</a></li>
                <li class=""><a href="#tab_3" data-toggle="tab" aria-expanded="false">备注信息</a></li>
              </ul>
              <div class="tab-content">
                <div class="tab-pane active" id="tab_1">
                  {% csrf_token %}

                  {% for field in form %}
                    {% if  field.name not in ex_list %}
                      <div class="form-group">
                        <label class="col-sm-1 control-label">{{ field.label_tag }}</label>
                        <div class="col-sm-5">
                          {{ field }}
                        </div>
                        {{ field.errors }}
                      </div>
                    {% endif %}
                  {% endfor %}

                </div>
                <!-- /.tab-pane -->
                <div class="tab-pane" id="tab_2">
                  {% for field in form %}
                    {% if  field.name in ex_list and field.name != 'customer_memo' %}
                      <div class="form-group">
                        <label class="col-sm-1 control-label">{{ field.label_tag }}</label>
                        <div class="col-sm-5">
                          {{ field }}
                        </div>
                        {{ field.errors }}
                      </div>
                    {% endif %}
                  {% endfor %}
                </div>
                <!-- /.tab-pane -->
                <div class="tab-pane" id="tab_3">
                  {% if form %}
                    <div class="form-group">
                      <label class="col-sm-1 control-label">{{ form.customer_memo.label_tag }}</label>
                      <div class="col-sm-9">
                        {{ form.customer_memo }}
                      </div>
                      {{ form.customer_memo.errors }}
                    </div>

                  {% endif %}

                </div>
                <!-- /.tab-pane -->
              </div>
              <!-- /.tab-content -->
            </div>
            <!-- nav-tabs-custom -->
          </div>
          <div class="box-footer">
            <input class="btn btn-primary center" type="submit" value="添加">
          </div><!-- /.col -->
      </div>
    </div>
  </section>
{% endblock content %}